package goodenglish.interfaces;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Random;
/**
 * ID生成器
 * @author qiuriyuchen E-mail:panpan_001@126.com
 */
public class UUID {
	public static synchronized String getUUID(){
		String str="";
		Random r=new Random();
		str+=new SimpleDateFormat("yyyyMMddHHmmssSSS").format(new Date());
		for(int i=0;i<15;i++){
			str+=r.nextInt(10000)%10;
		}
		return str;
		
	}
	public static void main(String[] args) {
		System.out.println(getUUID());
		System.out.println(getUUID().length());
	}
}
